package com.sunxd.rule.judge.handler;

import com.sunxd.rule.judge.beans.enums.OperatorTypeEnum;
import com.sunxd.rule.judge.beans.param.Condition;
import org.springframework.stereotype.Component;

/**
 * = 校验 ，use Objects.equals()
 *
 * support  int,double,long, date  ， obj
 */
@Component
public class EQConditionHandler extends AbsConditionHandler {

    @Override
    public Boolean doJudge(Condition condition) {
        return conditionJudge.eq(condition.getLeft(), condition.getRight());
    }

    @Override
    public String operatorType() {
        return OperatorTypeEnum.EQ.name();
    }


}
